<template>
  <div>
    <div v-html="popular"></div>
  </div>
</template>

<script>
export default {
  name: "popular",
  props: ["popular"],
};
</script>

<style>
/* 如果使用了 v-html  获取的后台的排好版的数据字符串，在写样式的时候，需要将  scoped删除 */
.top-rated {
  padding: 12px 0 12px 15px;
  background-color: #fff;
  margin-bottom: 10px;
}
.top-rated .title {
  margin: 0;
  font-size: 14px;
  color: #333;
  margin-bottom: 12px;
}
.top-rated-list {
  overflow: scroll;
  white-space: nowrap;
}
.top-rated-item {
  display: inline-block;
  width: 85px;
  overflow: hidden;
  margin-right: 10px;
}
.top-rated-item .poster {
  width: 85px;
  height: 115px;
  position: relative;
  margin-bottom: 6px;
}
.top-rated-item .poster img {
  height: 100%;
}
.line-ellipsis {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.top-rated-item .name {
  margin: 0;
  font-size: 13px;
  color: #222;
  margin-bottom: 3px;
}
.top-rated-item img {
  height: auto;
  width: 100%;
}
.top-rated-item .poster .score,
.top-rated-item .poster .wish {
  position: absolute;
  left: 4px;
  bottom: 2px;
  color: #faaf00;
  font-size: 11px;
  font-weight: 600;
}
</style>